package com.springboot.application.exceptions;

import com.springboot.application.enums.ResultCodeEnum;
import lombok.Data;

@Data
public class ApiException extends RuntimeException {

    /**
     * 异常的动态参数
     */
    private String args;

    private ResultCodeEnum resultCodeEnum;

    public ApiException(ResultCodeEnum resultCodeEnum) {
        super();
        this.resultCodeEnum = resultCodeEnum;
    }

    public ApiException(ResultCodeEnum resultCodeEnum, String args) {
        super();
        this.resultCodeEnum = resultCodeEnum;
        this.args = args;
    }


}
